﻿using System;
using System.Collections.Generic;
using System.Reflection;

namespace ConsoleUtility.Command
{
    /// <summary>
    /// 命令
    /// </summary>
    public class Command
    {
        private List<Method> methods; //方法列表
        private List<Option> options; //选项列表

        /// <summary>
        /// 初始化
        /// </summary>
        public Command()
        {
            methods = new List<Method>();
            options = new List<Option>();
        }

        /// <summary>
        /// 名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 资源类型
        /// </summary>
        public Type SourceType { get; set; }

        /// <summary>
        /// 默认方法
        /// </summary>
        public MethodInfo DefaultMethod { get; set; }

        /// <summary>
        /// 方法列表
        /// </summary>
        public List<Method> Methods { get { return methods; } }

        /// <summary>
        /// 选项列表
        /// </summary>
        public List<Option> Options { get { return options; } }
    }
}
